package com.wechat.pay.contrib.apache.httpclient.auth;

public interface Signer {

    /**
     * 获取签名信息;
     *
     * @param message 待签名数据;
     * @return {@link SignatureResult}
     */
    SignatureResult sign(byte[] message);

    class SignatureResult {

        /**
         * 签名
         */
        String sign;

        /**
         * 证书序列号, 16进制
         */
        String certificateSerialNumber;

        public SignatureResult(String sign, String serialNumber) {
            this.sign = sign;
            this.certificateSerialNumber = serialNumber;
        }
    }
}
